Preemptive Entities

Often during a simulation, it is desirable to have an entity preempt an activity at a location or resource in order to gain access to that location or resource. These situations can be modeled using preemptive priorities. An entity with a high enough priority can take over a location processing an entity or a location that is down. An entity with high enough priority can also take over a resource when it is being used by another entity or when it is off shift. When an entity takes over a location that was down or in use by another entity, the entity has preempted the downtime or the other entity.

In a multi-capacity location, the occupying entity will be preempted only if there is no more capacity at the location and the occupying entity is undergoing an operation time. Further, the occupying entity cannot be one that has been split, created, grouped, combined, ungrouped, or unloaded at the location.

An entity must have a priority one level higher than an occupying entity to preempt the occupying entity. An entity must have a priority that is two levels higher than a downtime to preempt the downtime. If an entity does not have a high enough priority to preempt another entity or downtime at a location, it waits in line (oldest by priority) to access the location (see Location Priorities and Preemption).

Note that the priority of an entity is not defined for the entity itself. For claiming a location, it is defined in the destination field of the routing. For capturing a resource it is defined as part of the GET, JOINTLY GET, or USE statement. A priority may, however, be assigned to an attribute of a referenced entity when it attempts to access a resource or location.